package com.cesc.demo.domain.product.entity;


import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.relational.core.mapping.Column;
import org.springframework.data.relational.core.mapping.Table;

import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import java.io.Serializable;

@Table("product")
@Data
@AllArgsConstructor
@ApiModel("商品基本信息")
@NoArgsConstructor
public class Product implements Serializable {

    @ApiModelProperty(value = "商品ID",example ="123456",name="id")
    @Id
    @GeneratedValue(strategy= GenerationType.IDENTITY)
    private Long id;
    @ApiModelProperty(value ="商品编号",example ="123456",name="productCode")
    @Column("productCode")
    private String productCode;
    @ApiModelProperty(value ="商品名",example ="测试商品名",name="productName")
    @Column("productName")
    private String productName;
    @ApiModelProperty(value ="商品描述",example ="测试商品描述",name="description")
    private String description;
    @ApiModelProperty(value ="商品价格",example ="1.5",name="price")
    private Float price;
}
